package com.yuan.kafkastudy.producer;

import org.apache.ibatis.javassist.bytecode.ByteArray;
import org.apache.kafka.clients.producer.ProducerInterceptor;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;

import java.util.Map;

/**
 * 1.实现ProducerInterceptor接口
 * 2.定义泛型
 * 3.重写接口
 */
public class ValueInterceptor implements ProducerInterceptor<String, ByteArray> {
    @Override
    public ProducerRecord<String, ByteArray> onSend(ProducerRecord<String, ByteArray> producerRecord) {
        return null;
    }

    @Override
    public void onAcknowledgement(RecordMetadata recordMetadata, Exception e) {

    }

    @Override
    public void close() {

    }

    @Override
    public void configure(Map<String, ?> map) {

    }
}
